#!/bin/bash

#curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

if [ ! -d "$HOME/vimrc" ]; then
    echo "--------------------download config file---------------------"
    if [ -f "$HOME/.ssh/id_rsa" ]; then
        git clone git@gitee.com:kduant/vimrc.git $HOME/vimrc
    else
        git clone https://gitee.com/kduant/vimrc.git $HOME/vimrc
    fi;
else
    echo "--------------------update config file-----------------------"
    cd $HOME/vimrc; git pull
fi

if [ ! -d $HOME/program ]; then
    mkdir -p $HOME/program
fi

# if [ ! -d $HOME/.config/wezterm ]; then
#     mkdir -p $HOME/.config/wezterm
#     ln -s $HOME/vimrc/linux_config/wezterm.lua $HOME/.config/wezterm/wezterm.lua
# fi

if [ ! -d "$HOME/.config/nvim" ]; then
    echo "--------------------软链接vim配置文件-----------------------"
    ln -s $HOME/vimrc/.config/nvim/ $HOME/.config/nvim
    #wln -s $HOME/vimrc/.config/starship.toml $HOME/.config/starship.toml
fi
